import java.awt.event.ActionEvent;

import javax.swing.JButton;


public class Rain extends SpeedModifier {
	
	JButton march;
	public Rain(MainCardPanel display, Party p) {
		super(display, p);
		march = new JButton("March onward");
		march.addActionListener(this);
		duration = rand.nextInt(4) + 2;
		speedFactor = 0.6;
		imageFilename = "rain.jpg";
		displayName = "It has started to rain";
	}
	@Override
	public int modifySpeed(int s) {
		return (int) ( ((double) s)*speedFactor );
	}
	@Override
	public void decay() {
		super.decay();
	}
	@Override
	public JButton[] getResponseElements() {
		JButton[] ret = {march};
		return ret;
	}
	
	public void actionPerformed(ActionEvent e) {
		super.actionPerformed(e);
	}
	public void addDuration(Rain r) {
		duration += r.duration;
		
	}
	
	
}
